﻿using UnityEngine;
using System.Collections;
using FairyGUI;
using Baiyy.Controls;
using XLua;

[Hotfix]
/// <summary>
/// 更新窗口。
/// </summary>
public class UpdateWindow : BaseWindow {

    #region vars
    internal GSlider _slider;
    internal GTextField _label;
	internal GTextField _vLabel;
    #endregion

    #region getter&setter
    public double progress {
        get { return _slider.value; }
        set { _slider.value = value; }
    }
    public string info {
        get { return _label.text; }
        set { 
			_label.text = value; 
			Baiyy.Console.Debug(value);
		}
    }
	public string version {
		get { return _vLabel.text; }
		set { _vLabel.text = value; }
	}
    #endregion

    #region methods
    public UpdateWindow() : base("Update", "Update") {
        _slider = contentView.GetChild("updateBar").asSlider;
        _label = contentView.GetChild("updateLabel").asTextField;
		_vLabel = contentView.GetChild("verLabel").asTextField;
    }
	#endregion
}